package two;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class test11081 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        int a=0;
        int b=0;
        for (int i = 0; i < n; i++) {
            x[i]=scanner.nextInt();
            y[i]=scanner.nextInt();
        }
        Arrays.sort(x);
        Arrays.sort(y);
        int mid = n/2;
        a=x[mid];
        b=y[mid];
        int sum=0;
        for (int i = 0; i < n; i++) {
            sum=sum+Math.abs(x[i]-a);
            sum=sum+Math.abs(y[i]-b);
        }
        System.out.println(sum);
    }
}
